package controllers

import (
	"github.com/beego/beego/v2/server/web"
)

//结构化类型(struct)
type UserController struct {
	web.Controller
}

// 返回网页 并且带入数据  (重写UserController的Get方法)
func (this *UserController) GetUserInfo() {
	this.Ctx.WriteString("user")
}

// 返回个页面
func (this *UserController) GetTpl() {
	this.Data["name"] = "benchu"
	this.Data["age"] = 18
	this.TplName = "index.tpl"
}
